/**
 * Company : Thai Informatic System Co., Ltd.
 * Created By : Chatree Siangklom
 * Created On : Aug 15, 2013  1:32:01 PM 
 * e-Mail : dr_chatree@hotmail.com
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : com.tis
 * File Name : JTextAreaOutputStream.java
 * TODO
 */
package com.tis;

import java.io.OutputStream;

import javax.swing.JTextArea;

/**
 * @author chatree
 *
 */
public class JTextAreaOutputStream extends OutputStream {
	JTextArea ta;

	public JTextAreaOutputStream(JTextArea t) 
	{
		super();
		ta = t;
	}

	public void write(int i) 
	{
		ta.append(Character.toString((char)i));
	}

	public void write(char[] buf, int off, int len) 
	{
		String s = new String(buf, off, len);
		ta.append(s);
	}
}
